Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@readapt/settings
Advanced tools
Readapt adaptations are based on a settings profile. This package contains Settings models, type definitions and a few utility functions to easily build Settings in order to adapt text.
Readapt adaptations are based on a settings profile. This package contains Settings models, type definitions and a few utility functions to easily build Settings in order to adapt text.
@readapt/settings
package: npm install @readapt/settings
Use buildDefaultSettings()
to build default settings
import { buildDefaultSettings } from '@readapt/settings'
const defaultSettings = buildDefaultSettings('en')
Then you can customize it using available options. For example:
import { colors, lineSpacingOptions, opacityOptions, silentLetterOpacityOptions, overrideDefaultLetters } from '@readapt/settings'
const mySettings = {
...defaultSettingsEn,
shadeAlternateLinesActive: true,
shadeAlternateLinesOpacity: opacityOptions[1].value,
silentLetterActive: true,
silentLetterOpacity: silentLetterOpacityOptions[2].value,
lineSpacing: lineSpacingOptions[1].value,
letters: overrideDefaultLetters('en', [
{ key: '2', value: 'd', bold: false, color: colors[0], active: true },
{ key: '8', value: 'm', bold: false, color: colors[1], active: true },
{ key: '7', value: 'n', bold: false, color: colors[2], active: true },
{ key: '3', value: 'p', bold: false, color: colors[3], active: true },
{ key: '1', value: 'b', bold: false, color: colors[4], active: true },
{ key: '24', value: 'w', bold: false, color: colors[7], active: true },
{ key: '19', value: 'u', bold: false, color: colors[8], active: true },
{ key: '4', value: 'q', bold: false, color: colors[11], active: true }
])
}
Each Option is typed to easily know available values. Explore our source code to check all available options.
overrideDefaultLetters()
and overrideDefaultPhonemes()
are two methods to easily customize letters and phonemes.
getLangConfig()
returns available phonemes and letters for each language.
FAQs
Readapt adaptations are based on a settings profile. This package contains Settings models, type definitions and a few utility functions to easily build Settings in order to adapt text.
The npm package @readapt/settings receives a total of 21 weekly downloads. As such, @readapt/settings popularity was classified as not popular.
We found that @readapt/settings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.